Add copilot-setup-steps.yml for full agentic PR reviews#288
Add copilot-setup-steps.yml for full agentic PR reviews#288AlBurns-MSFT wants to merge 2 commits into
Conversation
Without this file, Copilot Code Review falls back to limited static analysis and shows a warning: 'Copilot was unable to run its full agentic suite in this review.' Adding a minimal setup that checks out the repo gives Copilot the context needed for full reviews. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a .github/copilot-setup-steps.yml file intended to enable GitHub Copilot Code Review’s full agentic runner-based analysis by providing minimal environment setup steps.
Changes:
- Introduces a Copilot setup steps configuration file under
.github/. - Adds a single checkout step to provide full repository context to the agentic reviewer.
| copilot-setup-steps: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 |
|
Regarding the two review comments: 1. Format concern ("not a GitHub Actions workflow") — This is incorrect. The official GitHub docs confirm that 2. SHA pinning for actions/checkout — Fair hardening suggestion but low-risk here: this step only runs in the Copilot review sandbox (not CI), and |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1008covingtonlane
left a comment
There was a problem hiding this comment.
Thanks for taking this on — the warning is annoying and the intent is right. However, this PR as written will not fix it. Two blocking issues per the official docs:
1. Wrong path. The file must be at .github/workflows/copilot-setup-steps.yml, not .github/copilot-setup-steps.yml. Copilot looks for it as a GitHub Actions workflow file. At the current path it will be ignored and the warning will keep firing.
2. Wrong structure. The contents are not a valid GitHub Actions workflow. It needs a jobs.copilot-setup-steps job with runs-on, not a bare top-level steps:. The job name is significant — Copilot specifically looks up the job named copilot-setup-steps.
The minimal correct file for a docs-only repo would be:
name: "Copilot Setup Steps"
on:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml
jobs:
copilot-setup-steps:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4The on: block lets the workflow run as a normal Actions check so you can verify it actually works before merging.
Side note (non-blocking): the docs explicitly say "If you do not check out your code, Copilot will do this for you." So for a docs-only repo with no install steps, you may not need this file at all — the warning in the linked PR #287 might be from an older PR before whatever ships full agentic mode by default, or from a different cause. Worth confirming the warning actually goes away after merging a corrected version before assuming this is the fix.
|
Closing this PR. I created this because I saw the automatic copilot reviews outputting failure messages instead of running. You can see some of them in the actions history: https://github.com/Azure/AzureLocal-Supportability/actions You'll see they appeared to be transient and many have succeeded since the failures. I am thinking this is not an issue with out config it's was some transient issue outside of our control. Wrong change + transient external problem = closed PR. |
Problem
Recent PRs show the warning:
This happens because the repo lacks a
.github/copilot-setup-steps.ymlfile. Without it, Copilot Code Review cannot spin up a runner environment and falls back to limited static diff analysis.Fix
Add a minimal
copilot-setup-steps.ymlthat checks out the repo. Since this is a docs-only repo (Markdown TSGs), no build tools or dependencies are needed — just a checkout gives Copilot full repo context for agentic reviews (cross-file references, link validation, structural analysis).References